The present invention relates to a magnetic disk apparatus composed of an redundant array of inexpensive disks (hereinafter called RAID system) for dividing, transferring and storing data from an external device in plural magnetic disks, generating error-correcting information and storing in the magnetic disks, and a method of data transfer.
Initially, the RAID system is a data storage system for dividing and storing large amounts of data entering from an external device (for example, a host computer) in plural magnetic disks, so that large amounts of data can be promptly written into magnetic disks as hard disks. Hitherto, the RAID is classified into the following five kinds according to the difference in the method of dividing and storing the data in plural magnetic disks.
The first is the RAID(0) for only dividing and storing the data in magnetic disks in sector units, the second is the RAID(1) for storing same data in plural magnetic disks in duplicate, the third is the RAID(2) and RAID(3) (as classified by compiling method of error-correcting information, for example, Hamming/parity) for dividing and storing the data in magnetic disks in bit units, compiling error-correcting information at this time and storing in an exclusive magnetic disk, the fourth is the RAID(4) for dividing and storing the data in magnetic disks in sector units, compiling error-correcting information at this time and storing in an exclusive magnetic disk for error-correcting information, and the fifth is the RAID(5) for dividing the data in sector units, storing recursively in magnetic disks, and storing the error-correcting information compiled at this time recursively in magnetic disks in sector units same as other information (without using exclusive magnetic disk for error-correcting information).
Referring next to FIG. 11, the types of RAID, that is, RAID(0) to RAID(5) are described in detail below. FIG. 11 shows the configurations of RAID(0) to RAID(5), in which (A) relates to RAID(0), (B) to RAID(1), (C) to RAID(2) and RAID(3), (D) to RAID(4), and (E) to RAID(5).
FIG. 11 (A) shows the RAID(0) 1 for only dividing and storing the input data in magnetic disks in sector units. In the RAID(0) 1, plural magnetic disks (called hard disk devices (HDD) or disks) 61 to 64 are operated simultaneously, and, for example, write data 7 transferred from the host or the like is divided and stored in the disks 61 to 64, and the data entered in the disks 61 to 64 can be transferred at high speed, but error correction of data stored in a defective magnetic disk is disabled.
FIG. 11 (B) shows the RAID(1) 2, which stores the entered data, for example, the same data in sector units of write data 7 transferred from the host in duplicate in plural magnetic disks (disks) 65 and 66. The RAID(1) 2 is also known as the mirrored disk, and it is the storage method of high reliability, but since the same data is stored in duplicate, the efficiency of use of hard disks is poor.
FIG. 11 (C) shows the RAID(2) or RAID(3) 3 for dividing and storing the entered data, for example, the write data 7 transferred from the host in plural magnetic disks (disks) 67 to 70 in bit units, generating error-correcting information of the stored data, and storing in a disk 71. Between the RAID(2) and RAID(3), the manner of generating error-correcting information about the defective magnetic disk is different, for example, parity method or Hamming method.
FIG. 11 (D) shows the RAID(4) 4 for dividing and storing the entered data, for example, the write data 7 transferred from the host in plural magnetic disks (disks) 72 to 75 in sector units, generating error-correcting information for defective magnetic disk, and storing in a disk 76.
FIG. 11 (E) shows the RAID(5) 5 for dividing and storing recursively the entered data, for example, the write data 7 transferred from the host in plural magnetic disks (disks) 77 to 81 in sector units, generating error-correcting information P for defective magnetic disk, and storing in the disks 77 to 81 recursively.
Among these RAID(0) 1 to RAID(5) 5, in the RAID(1) 2 to RAID(5) 5, if a trouble occurs in any one of the disks 65 to 81, information of the defective disk is created by using the error-correcting information, and the information can be read out to an external device (for example, the host computer). In the RAID(0) 1, the data can be transferred and written at high speed, such as video and audio data, but if any one of the disks 61 to 64 has a trouble, the data cannot be read out.
Thus, in the magnetic disk apparatus (or hard disk apparatus) composed of such conventional RAID system, except for the RAID(0), if one of the magnetic disks has a trouble, the information of the defective magnetic disk can be created from the error-correcting information, and the operation can be continued. However, except for the RAID(0), when writing data, the error-correcting information must be created from the write data, and the write time is very long as compared with the case of writing in the RAID(0) in which the job time is dividing and recording only without making error-correcting information.
When storing and reproducing large amounts of video and audio data in magnetic disks, fast transfer of mass data is needed, and usually the RAID(0) is employed. In recording or reproducing of video and audio data, although high reliability by the use of error-correcting information is required, in the RAID(0), if a trouble occurs in one of the disks 61 to 64, data cannot be read out, and error cannot be corrected.
The invention is devised to solve the problems of the prior arts, and it is an object thereof to present a magnetic disk apparatus and a method of data transfer capable of transferring data fast, as a speed as high as in the RAID(0), when transferring and storing mass data such as video and audio data in magnetic disks by using the RAID(4) or RAID(5) capable of correcting error.
The magnetic disk apparatus as set forth in claim 1 of the invention comprises a CPU for controlling analysis and transfer of data, communication means for receiving data from an external device and issuing, error-correcting information generating means for generating error-correcting information for the information in the error-correcting information generating unit including at least the data entered from the external device, magnetic disks for storing the data in the error-correcting information generating unit including the data from the external device and its error-correcting information, high-speed storage means for temporarily storing the data from the external device, and data transfer means for transferring data by connecting the CPU and each means, in which the data entered from the external device is temporarily stored in the high-speed storage means, and when all data in the error-correcting information generating unit including the entered data is stored, all data in the error-correcting information generating unit is transferred to the magnetic disks and simultaneously transferred also to the error-correcting information generating means.
The invention thus provides the magnetic disk apparatus for storing write data from the external device in the high-speed storage means in the error-correcting information generating unit, transferring all data to magnetic disks at once when storing all data in the error-correcting information generating unit, and eavesdropping on all transferred data by the error-correcting information generating means, and therefore writing of data in the magnetic disks and creation of error-correcting information are executed simultaneously to save the error-correcting information creation time, so that the data writing time can be shortened.
In the magnetic disk apparatus as set forth in claim 2 of the invention, the high-speed storage means includes plural storage regions for storing all data in the error-correcting information generating unit including the data entered from the external device, the entered data is divided and stored in each storage region specified by the external device, and when all data in the error-correcting information generating unit is stored in one storage region, all data can be transferred simultaneously to the magnetic disks and error-correcting information generating means.
The invention thus provides the magnetic disk apparatus in which plural storage regions are provided for storing all data in the error-correcting information generating unit, classifying and storing the written data from the external device in each divided storage region of the high-speed storage means, and transferring all data to the magnetic disks and error-correcting information generating means simultaneously when all data in the error-correcting information generating unit is stored and it is ready to create error-correcting information, and therefore plural data groups in the error-correcting information generating unit can be received, and the data group ready for creation of error-correcting information can be first transferred to the magnetic disks, so that the transfer efficiency is enhanced.
The magnetic disk apparatus as set forth in claim 3 of the invention comprises a CPU for controlling analysis and transfer of data, communication means for receiving data from an external device and issuing, error-correcting information generating means for generating error-correcting information for the information in the error-correcting information generating unit including at least the data entered from the external device, magnetic disks for storing the data in the error-correcting information generating unit including the data from the external device and its error-correcting information, high-speed storage means for temporarily storing the data from the external device, and data transfer means for transferring data by connecting the CPU and each means, in which input data from outside is classified and stored in the error-correcting information generating unit on the high-speed storage means, the stored data is transferred to plural magnetic disks in the magnetic disk units, the transfer data is simultaneously transferred to the error-correcting information generating means to create error-correcting information, the error-correcting information generating means has plural second high-speed storage means, and therefore in the generating process of error-correcting information, writing job and reading job can be executed parallel in each second high-speed storage means.
The magnetic disk apparatus as set forth in claim 4 of the invention relates to the invention as set forth in claim 3, in which the plural second high-speed storage means are two pieces, and while operating the previous stored data being read out from one second high-speed storage means and next transfer data, the result is written into other second high-speed storage means.
In the magnetic disk apparatus according to the invention as set forth in claim 3 and claim 4, high-speed memories of similar grade are used in the high-speed storage means and plural internal memories of the parity generator so as to execute and complete simultaneously, and therefore in spite of creation of error-correcting information from the write data corresponding to the HDD, mass data can be transferred at high speed nearly as in the RAID(0).
The method of data transfer of a magnetic disk apparatus as set forth in claim 5 of the invention comprises the steps of receiving data to be stored in magnetic disks from an external device and its write command, storing all data in the error-correcting information generating unit to which the data received from the external device belongs temporarily in a storage region of high-speed storage means, and transferring all data in the error-correcting information generating unit temporarily stored in the storage region of the high-speed storage means to the magnetic disks and error-correcting information generating means simultaneously, and therefore all data in the error-correcting information generating unit to which the data received from the external device belongs is sequentially stored in the storage region of the high-speed storage means until all is stored, and all data in the error-correcting information generating unit stored in the storage region is transferred to the magnetic disk and error-correcting information generating means simultaneously.
The invention provides the method of data transfer of a magnetic disk apparatus for storing all data in the error-correcting information generating unit to which the data received from the external device belongs sequentially in the storage region of the high-speed storage means until all is stored, and transferring all data in the error-correcting information generating unit stored in the storage region to the magnetic disks and error-correcting information generating means simultaneously, and therefore writing of data in the magnetic disks and creation of error-correcting information are executed simultaneously to save the error-correcting information creation time, so that the data writing time can be shortened.
The method of data transfer of a magnetic disk apparatus as set forth in claim 6 of the invention relates to the method as set forth in claim 5, in which the high-speed storage means has plural storage regions for storing temporarily all data in the error-correcting information generating unit to which the data received from the external device belongs, comprising the steps of dividing and storing the received data in the storage region specified by the external device, and when receiving all data in the error-correcting information generating unit in one storage region, transferring all data to the magnetic disks and error-correcting information generating means simultaneously.
The invention provides the method of data transfer of a magnetic disk apparatus in which the high-speed storage means has plural storage regions for storing temporarily all data in the error-correcting information generating unit to which the data received from the external device belongs, for dividing and storing the received data in each storage region, and when receiving all data in the error-correcting information generating unit in one storage region to be ready to create error-correcting information, transferring all data to the magnetic disks and error-correcting information generating means simultaneously, and therefore plural data groups in the error-correcting information generating unit can be received, and the data group ready for creation of error-correcting information can be first transferred to the magnetic disks, and the transfer time is saved so that the transfer efficiency is further enhanced.
In the present invention, since the error-correcting information generating means eavesdrops on the data transferred on the CPU bus, the constitution of the magnetic disk of the error-correcting information generating unit is not specified by the hardware and hence can be set freely. For example, connecting seven magnetic disks to the magnetic disk communication means, six may be used for data and one may be used for setting the error-correcting information, or by connecting four magnetic disks, three may be used for data and one may be used for setting the error-correcting information. Thus, by changing the number of magnetic disks being connected, it is possible to widen the setting range of the storage capacity.